import request from '@/utils/request'

// 查询工时填报列表
export function listManHour(query) {
  return request({
    url: '/mis/manHour/list',
    method: 'get',
    params: query
  })
}
// 查询工时填报列表
export function queryByQuestId(query) {
  return request({
    url: '/mis/manHour/queryByQuestId',
    method: 'get',
    params: query
  })
}
// 查询工时填报列表
export function queryHourByProjectId(query) {
  return request({
    url: '/mis/manHour/queryByProjectId',
    method: 'get',
    params: query
  })
}

// 查询工时填报详细
export function getManHour(id) {
  return request({
    url: '/mis/manHour/' + id,
    method: 'get'
  })
}
// 查询工时填报详细
export function queryById(id) {
  return request({
    url: '/mis/manHour/queryById/' + id,
    method: 'get'
  })
}
// 查询未填写人
export function queryHourByTime(query) {
  return request({
    url: '/mis/manHour/queryHourByTime',
    method: 'get',
    params: query
  })
}
// 通过任务id查询工时填报详细
export function getSelectWork(id) {
  return request({
    url: '/mis/manHour/getSelectWork/' + id,
    method: 'get'
  })
}

// 通过任务id查询工时填报详细
export function getSelectWorkList(id) {
  return request({
    url: '/mis/manHour/getSelectWorkList/' + id,
    method: 'get'
  })
}
// 通过id修改子表状态
export function updateStateById(id) {
  return request({
    url: '/mis/manHour/updateStateById/' + id,
    method: 'get'
  })
}

// 新增工时填报
export function addManHour(data) {
  return request({
    url: '/mis/manHour',
    method: 'post',
    data: data
  })
}
// 新增或修改工时填报
export function insertOrUpdate(data) {
  return request({
    url: '/mis/manHour/insertOrUpdate',
    method: 'post',
    data: data
  })
}
// 通知企业微信
export function noticeFirmWechat(data) {
  return request({
    url: '/mis/manHour/noticeFirmWechat',
    method: 'post',
    data: data
  })
}
// 修改工时填报
export function updateManHour(data) {
  return request({
    url: '/mis/manHour',
    method: 'put',
    data: data
  })
}

// 删除工时填报
export function delManHour(id) {
  return request({
    url: '/mis/manHour/' + id,
    method: 'delete'
  })
}
